<template>
  <div>
    <h1>学生信息录入</h1>
    <!-- 

        stu_id学号（不可以重复）Ystu_name姓名Ystu_sex性别Ystu_jg籍贯Ystu_date出生日期stu_hobby爱好stu_gbf男或女朋友stu_head_img
     -->
    学号：<input type="text" v-model.trim="stu_id" /><br />
    姓名：<input type="text" v-model.trim="stu_name" /><br />
    性别：<input type="text" v-model.trim="stu_sex" /><br />
    籍贯：<input type="text" v-model.trim="stu_jg" /><br />
    出生日期：<input type="text" v-model.trim="stu_date" /><br />
    爱好：<input type="text" v-model.trim="stu_hobby" /><br />
    朋友：<input type="text" v-model.trim="stu_gbf" /><br />
    头像：<input type="text" v-model.trim="stu_head_img" /><br />
    <button @click="stuInfoSub">提交学生信息</button>
  </div>
</template>

<script>
import { stu_sub_ajax } from "@/api/student.js";
export default {
  data() {
    return {
      stu_id: "",
      stu_name: "",
      stu_sex: "",
      stu_jg: "",
      stu_date: "",
      stu_hobby: "",
      stu_gbf: "",
      stu_head_img: "",
    };
  },
  methods: {
    async stuInfoSub() {
      console.log(stu_sub_ajax);
      const result = await stu_sub_ajax({
        stu_id: this.stu_id,
        stu_name: this.stu_name,
        stu_sex: this.stu_sex,
        stu_jg: this.stu_jg,
        stu_date: "",
        stu_hobby: "",
        stu_gbf: "",
        stu_head_img: "",
      });
      console.log(result);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>